package com.woniuxy.api;

import com.woniu.cloud.common.dto.Result;
import com.woniu.cloud.form.InsertCommentForm;
import com.woniu.cloud.form.InsertComplaintForm;
import com.woniu.cloud.form.SelectCommentForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @description: 评论api
 * @author: ZXG
 * @time: 2021/9/23
 */
@FeignClient(value = "user-assembly",contextId = "commentApi")
public interface CommentApi {


    /**
     * 新增评论
     * @param StoreReviews
     * @return
     */
    @PostMapping("/insertReviews")
    Result insertReviews(@RequestBody InsertCommentForm StoreReviews);


    /**
     * 用户查询评论
     * @param selectCommentForm
     * @return Result
     */
    @GetMapping("/getStoreReviewsList")
    Result getStoreReviewsList(@RequestBody SelectCommentForm selectCommentForm);



    /**
     * 根据评论id删除评论
     * @param storeReviewsId 评论id
     * @return Result
     **/
    @DeleteMapping("/deleteReview")
    Result deleteReview(@RequestParam("storeReviewsId") Integer storeReviewsId);


    /**
    * 新增投诉
    * @return Result
     * 新增投诉
     * @return Result
     **/
    @PostMapping("/insertComplaint")
    Result insertComplaint(@RequestBody InsertComplaintForm form);
}
